package org.itstack.chain;

/**
 * 董事会审批处理器
 * 处理金额超过10000元的申请
 */
public class BoardHandler extends AbstractApprovalHandler {
    
    private static final double MIN_AMOUNT = 10000.0;
    
    public BoardHandler() {
        super("董事会");
    }
    
    @Override
    public ApprovalResult handleRequest(ApprovalRequest request) {
        double amount = request.getAmount();
        
        if (amount > MIN_AMOUNT) {
            // 董事会可以审批超过10000元的申请
            return new ApprovalResult(true, getHandlerName(), 
                "董事会审批通过，金额：" + amount + "元");
        }
        
        // 金额不足，返回null让下一个处理器处理
        return null;
    }
}
